package com.henghai.zhenxuan.data.bean;

import com.henghai.zhenxuan.data.config.Const;

import java.util.ArrayList;

public class ProductInfoBean {

    private String createBy;
    private String createTime;
    private String updateBy;
    private String updateTime;
    private String remark;
    private int id;
    private String productName;
    private String productAmount;
    private String productType;
    private String productPoints;
    private String productQuantity;
    private String productRemark;


    public String getCreateBy() {
        return createBy;
    }

    public void setCreateBy(String createBy) {
        this.createBy = createBy;
    }

    public String getCreateTime() {
        return createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    public String getUpdateBy() {
        return updateBy;
    }

    public void setUpdateBy(String updateBy) {
        this.updateBy = updateBy;
    }

    public String getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(String updateTime) {
        this.updateTime = updateTime;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getProductName() {
        return productName;
    }

    public void setProductName(String productName) {
        this.productName = productName;
    }

    public String getProductAmount() {
        return productAmount;
    }

    public void setProductAmount(String productAmount) {
        this.productAmount = productAmount;
    }

    public String getProductType() {
        return productType;
    }

    public void setProductType(String productType) {
        this.productType = productType;
    }

    public String getProductPoints() {
        return productPoints;
    }

    public void setProductPoints(String productPoints) {
        this.productPoints = productPoints;
    }

    public String getProductQuantity() {
        return productQuantity;
    }

    public void setProductQuantity(String productQuantity) {
        this.productQuantity = productQuantity;
    }

    public String getProductRemark() {
        if (productRemark!=null && !productRemark.equals(""))
            return productRemark;
        else
            return "商品详情";
    }

    public void setProductRemark(String productRemark) {
        this.productRemark = productRemark;
    }

    private ArrayList<ProductFileListBean> productFileList;

    public ArrayList<ProductFileListBean> getProductFileList() {
        return productFileList;
    }

    @Override
    public String toString() {
        return "ProductInfoBean{" +
                "createBy='" + createBy + '\'' +
                ", createTime='" + createTime + '\'' +
                ", updateBy='" + updateBy + '\'' +
                ", updateTime='" + updateTime + '\'' +
                ", remark='" + remark + '\'' +
                ", id=" + id +
                ", productName='" + productName + '\'' +
                ", productAmount='" + productAmount + '\'' +
                ", productType='" + productType + '\'' +
                ", productPoints='" + productPoints + '\'' +
                ", productQuantity='" + productQuantity + '\'' +
                ", productRemark='" + productRemark + '\'' +
                ", productFileList=" + productFileList +
                '}';
    }

    public static class ProductFileListBean {
        private String url;
        private int id;
        private String productId;
        private String imageWidth;
        private String imageHeight;

        private String fileType;

        public String getFileType() {
            return fileType;
        }

        public String getImageWidth() {
            return imageWidth;
        }

        public String getImageHeight() {
            return imageHeight;
        }

        public int getId() {
            return id;
        }

        public String getProductId() {
            return productId;
        }

        public String getUrl() {
            url =  Const.URL_IMAGE +url.replace("/profile","");
            return url;
        }

        @Override
        public String toString() {
            return "ProductFileListBean{" +
                    "url='" + url + '\'' +
                    ", id=" + id +
                    ", productId='" + productId + '\'' +
                    '}';
        }
    }
}
